package edu.faytechcc.csc.gui.search.details;

import java.awt.BorderLayout;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 * A panel used to store and display the Photo and Genera's sent into the
 * constructor.
 *
 * @author Stephanie Mckenzie and Jasmin Pastari
 */
public class ImgGenerasPanel extends JPanel
{

    private JLabel photoLabel;
    private JLabel generaLabel;

    /**
     * Constructor for the IMGGenerasPanel that accepts two Strings using them
     * to set the icon and text in the labels.
     *
     * @param photo
     * @param generas
     */
    public ImgGenerasPanel(String photo, String generas)
    {
        photoLabel = new JLabel();
        generaLabel = new JLabel(generas);
        ImageIcon image = new ImageIcon(photo);
        photoLabel.setIcon(image);
        this.setLayout(new BorderLayout());
        this.add(photoLabel, BorderLayout.NORTH);
        this.add(generaLabel, BorderLayout.SOUTH);
    }
}
